﻿using System;

namespace CS_2_3
{
    class Program
    {
        static int Shui_Xian_Shu(int n)
        {
            int a, b, c;
            a = n % 10;
            b = n % 100 - a;
            c = n - b - a;
            if ((Math.Pow(a, 3) + Math.Pow(b / 10, 3) + Math.Pow(c / 100, 3)) == n)
            {
                return 1;
            }
            else
            {
                return 0;
            }
        }
        static void Main(string[] args)
        {
            for (int i = 100; i <= 999; i++)
            {
                if (Shui_Xian_Shu(i) == 1)
                    Console.WriteLine(i);
            }
        }
    }
}